<template>
  <div >
      <div v-if="flag===1" class="typhoon-box"  style="margin-right:140px">
    <div class="title">
      <span>详细信息</span><i class="el-icon-close" @click="closeInfo"></i>
    </div>
    <div class="second">
        <span class="rightSpan">ID:{{ typhoonData.id }}</span>
    </div>
    
    <div class="second">
        <span >着陆点ID:{{ typhoonData.landingPointId }}</span>
    </div>
    <div class="second">
        <span >着陆点地名:{{ typhoonData.landingPointName }}</span>
    </div>

<div class="second">
    <span class="rightSpan">经度:{{ typhoonData.longitude }}</span>
</div>

<div class="second">
    <span class="rightSpan">纬度:{{ typhoonData.latitude }}</span>
</div>
  </div>
  
  <div v-if="flag===2" class="typhoon-box"   style="margin-right:140px">
    <div class="title">
      <span>详细信息</span><i class="el-icon-close" @click="closeInfo"></i>
    </div>
    <div class="second">
        <span class="rightSpan">电缆编号:{{ typhoonData.cableId }}</span>

    </div>
    
    <div class="second">
        <span >长度:{{ typhoonData.length }}</span>
    </div>
    <div class="second">
        <span >名字:{{ typhoonData.name }}</span>
    </div>
    
    <div class="second">
        <span >射频:{{ typhoonData.rfs }}</span>
    </div>
    <div class="second">
        <span >供应商:{{ typhoonData.suppliers }}</span>
    </div>

  </div>
  <div v-if="flag===3" class="typhoon-box"   style="margin-right:140px">
    <div class="title">
      <span>详细信息</span><i class="el-icon-close" @click="closeInfo"></i>
    </div>
    <div class="second">
        <span class="rightSpan">ID:{{ typhoonData.id }}</span>

    </div>
    
    <div class="second">
        <span >名称:{{ typhoonData.campusname }}</span>
    </div>
    <div class="second">
        <span >构建类型:{{ typhoonData.buildtype }}</span>
    </div>
    
    <div class="second">
        <span >城市:{{ typhoonData.city }}</span>
    </div>
    <div class="second">
        <span >国家:{{ typhoonData.countryname }}</span>
    </div>
    
    <div class="second">
        <span >设备来源:{{ typhoonData.facilityowner }}</span>
    </div>
    <div class="second">
        <span >设备名称:{{ typhoonData.facilityname }}</span>
    </div>

    <div class="second">
    <span class="rightSpan">经度:{{ typhoonData.longitude }}</span>
</div>

<div class="second">
    <span class="rightSpan">纬度:{{ typhoonData.latitude }}</span>
</div>
  </div>
  </div>

</template>

<script>
export default {
  name: "TyphoonInfo",
  data() {
    return {};
  },
  props: {
    typhoonData: Object,
    flag:Number,
    closeInfo: Function
  },
  methods: {
     
  },
  mounted(){
    // console.log(`output->typhoonData`,props)
  },
};
</script>
<style lang="scss" scoped>
.typhoon-box {
  // width: 100%;
  // height:330px ;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  // bottom: 200px;
  // right: 200px;
  z-index: 1001;
  color: #fff;
  .title {
    display: flex;
    border-radius: 12px 12px 0 0;
    background: rgba(0, 0, 0, 0.4);
    height: 50px;
    line-height: 50px;
    color: #0fdaff;
    ::v-deep .el-icon-close {
      display: block;
      font-size: 30px;
    line-height: 50px;
margin-right: 5px;
      // position: absolute;
      // top: 3%;
      // right: 10px;
      cursor: pointer;
    }
    span {
      text-align: center;
      width: 100%;
      font-size: 18px;
      font-weight: bold;
      letter-spacing: 1.5px;
    }
  }
  .second{
    margin:0 20px;
    display: flex;
    height: 40px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #0fdaff;
    
    // .left{
    //   width: 50%;
    // }
    // .center{
    //   width: 50%;

    // }
  }
  .rightSpan {
  white-space: normal;
  word-wrap: break-word; /* 为了更好的兼容性 */
  overflow-wrap: break-word; /* 为了更好的兼容性 */
}
}
</style>